From: Chong Yidong Date: Tue, 30 Aug 2011 22:38:07 +0000 (-0400) Subject: Fix syntax scanning bug causing fontification crashes. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~17^2~35 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1e93b28119d39a81d94dc38f524fae1557ddca4b;p=emacs.git Fix syntax scanning bug causing fontification crashes. * src/syntax.c (find_defun_start): Update all cache variables if exiting early. --- diff --git a/src/ChangeLog b/src/ChangeLog index 228f63e6b75..55f218966de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-08-30 Chong Yidong + + * syntax.c (find_defun_start): Update all cache variables if + exiting early (Bug#9401). + 2011-08-19 Andreas Schwab * keyboard.c: Include "process.h" diff --git a/src/syntax.c b/src/syntax.c index bfdf0e5ee6d..ba3810227eb 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -364,7 +364,12 @@ find_defun_start (pos, pos_byte) if (!open_paren_in_column_0_is_defun_start) { + find_start_value = BEGV; find_start_value_byte = BEGV_BYTE; + find_start_buffer = current_buffer; + find_start_modiff = MODIFF; + find_start_begv = BEGV; + find_start_pos = pos; return BEGV; }